package cn.wen.yaling.xo.service;

import cn.wen.yaling.commons.utils.ResultEntity;
import cn.wen.yaling.commons.vo.PermissionAddVO;
import cn.wen.yaling.commons.vo.PermissionUpdateVO;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.wen.yaling.commons.utils.PageUtils;
import cn.wen.yaling.commons.entity.PermissionEntity;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 
 *
 * @author FY
 * @email 932043654@qq.com
 * @date 2022-08-13 02:07:37
 */
public interface PermissionService extends IService<PermissionEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 通过用户名获取所有权限码
     * @param account
     * @return
     */
    Set<String> getAllPermissionByUsername(String account);

    /**
     * 获取权限列表
     * @return
     */
    ResultEntity getPermissionList();

    /**
     * 添加权限信息
     * @param permissionAddVO
     * @return
     */
    ResultEntity addPermission(PermissionAddVO permissionAddVO);

    /**
     * 更新权限信息
     * @param permissionUpdateVO
     * @return
     */
    ResultEntity editPermission(PermissionUpdateVO permissionUpdateVO);

    /**
     * 批量删除权限
     * @param permissionId
     * @return
     */
    ResultEntity deleteBatchPermission(Integer permissionId);

    /**
     * 获取简易的权限列表值
     * @return
     */
    ResultEntity getSimplePermissionList();

    /**
     * 获取权限树列表
     * @return
     */
    ResultEntity getPermissionTreeList();

}

